<?php
header ( 'Content-Type: text/html; charset=UTF-8' );

session_start ();
require_once "class/ConexionFactory.php";
require_once "class/Galeria.php";
$conexion = ConexionFactory::getConexion ();

$galeria = Galeria::getGaleriaRandom ( 12 );

?>
<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon" href="images/favicon.ico" />
<style type="text/css">
@import url(stylesheets/dark/styles.css);
</style>

<title>P&P Chile | Galeria</title>

<!-- Initialise jQuery Library -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/cufon/cufon-yui.js"></script>
</head>
<body id="sp">
<?php
$currentPage = 'Galeria';
include 'header.php';
?>
<!-- Begin Header -->
	<div class="header_full sample_01">
		<div class="head_top_shadow"></div>
		<div class="head_bot_shadow"></div>
		<div id="header"></div>
	</div>
	<!-- End Header -->

	<!-- Start Content Wrapper -->
	<div class="content_wrapper">
		<div class="PageTitle">
			<h1>Galeria</h1>
		</div>
		<div id="breadcrumbs">
			<a href="index.html" title="Home">Home</a> &raquo; Galería
		</div>
		<!-- Content Area -->
		<div id="content">
			<div class="gallery">
				<ul>
				<?php
				foreach ( $galeria as $item ) {
					?>
					<li>
						<div class="gallery_item">
							<img src="admin/<?php echo $item->Archivo?>" width="214" height="194" class="cover" alt="" />
							<h4><?php echo $item->Nombre?></h4>
							<p><?php echo $item->Descripcion?></p>
							<!-- 							<a href="#" class="btn alignleft" title="read more">read more</a> -->
							<a href="admin/<?php echo $item->Archivo?>" class="zoom" data-rel="prettyPhoto[gallery]">Enlarge</a>
						</div>
					</li>
					<?php } ?>
				</ul>
				<div class="clear"></div>
			</div>
			<!-- Start Paging -->
			<!-- 			<div class="wp-pagenavi"> -->
			<!-- 				<ul> -->
			<!-- 					<li><span class="pages">Page 1 of 7</span></li> -->
			<!-- 					<li><a href="#" class="first">&laquo; First</a></li> -->
			<!-- 					<li><a href="#" class="previouspostslink">&lsaquo;</a></li> -->
			<!-- 					<li><a href="#" class="page">1</a></li> -->
			<!-- 					<li><a href="#" class="page">2</a></li> -->
			<!-- 					<li><a href="#" class="page">3</a></li> -->
			<!-- 					<li><a href="#" class="page">4</a></li> -->
			<!-- 					<li><span class="current">5</span></li> -->
			<!-- 					<li><span class="extend">...</span></li> -->
			<!-- 					<li><a href="#" class="nextpostslink">&rsaquo;</a></li> -->
			<!-- 					<li><a href="#" class="last">Last &raquo;</a></li> -->
			<!-- 				</ul> -->
			<!-- 			</div> -->

			<!-- Start Alternate Paging -->
			<!-- 			<div class="navigation" id="nav-above"> -->
			<!-- 				<div class="nav-previous"> -->
			<!-- 					<a href="#"><span class="meta-nav">&larr;</span> Older posts</a> -->
			<!-- 				</div> -->
			<!-- 				<div class="nav-next"> -->
			<!-- 					<a href="#">Newer posts <span class="meta-nav">&rarr;</span></a> -->
			<!-- 				</div> -->
			<!-- 			</div> -->
			<div class="clear"></div>
		</div>
	</div>
	<!-- End Content Wrapper -->
		<?php include 'footer.php';?>
	<!-- Theme Hook -->
	<script type="text/javascript" src="js/Includer.js"></script>
	<script type="text/javascript">Cufon.now();</script>
</body>
</html>